#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "StructuredActivityNode.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class ExecutableNode;

/// <summary>
/// SequenceNode
/// A SequenceNode is a StructuredActivityNode that executes a sequence of
/// ExecutableNodes in order.
/// </summary>
class UMLMODEL_EXPORT SequenceNode : public StructuredActivityNode {

public: // Constructors and destructors
    explicit SequenceNode(const QString& umlType="uml::SequenceNode");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// executableNodes getter
    /// The ordered set of ExecutableNodes to be sequenced.
    /// </summary>
    vector<shared_ptr<ExecutableNode>>& executableNodes();

private: // Fields
    /// <summary>
    /// executableNodes
    /// The ordered set of ExecutableNodes to be sequenced.
    /// </summary>
    vector<shared_ptr<ExecutableNode>> executableNodes_;

};

} // namespace uml
